<template>
    <div class="MainView">
        <el-container>
            <!-- 侧边栏 -->
            <el-aside :class="Aside == true ? 'is-active' : ''">
                <CommonAside></CommonAside>
            </el-aside>

            <el-container>
                <!-- 头部 -->
                <el-header height="60px">
                    <CommonHeader @zidingyi="getAside" :infoaar="infor"></CommonHeader>
                </el-header>

                <!-- 内容区 -->
                <el-main>
                    <router-view></router-view>
                </el-main>
            </el-container>
        </el-container>
    </div>
</template>

<script>
import CommonAside from '../components/CommonAside.vue'
import CommonHeader from '../components/CommonHeader.vue'

export default {
    name: "MainView",
    data() {
        return {
            Aside: true,
            infor: true,
            search: false,
            num: 0
        }
    },
    methods: {
        getAside(Aside) {
            console.log(this.showBox);
            this.Aside = Aside
        },
        MainView() {
            console.log(123);
        }



    },

    mounted() {

    },
    components: {
        CommonAside,
        CommonHeader,
    }
}


</script>


<style lang="less" scoped>
.el-header,
.el-footer {

    background-color: #ffffff;
    color: #333;
    text-align: center;
    line-height: 60px;
}

.el-aside {
    width: 0 !important;
    // width: 250px !important;
    height: 100vh;
    min-height: 100vh;
    background-color: #D3DCE6;
    color: #333;
    text-align: center;
    line-height: 200px;
}

.el-aside.is-active {
    width: 250px !important;
    height: 100vh;
    min-height: 100vh;
    background-color: #D3DCE6;
    color: #333;
    text-align: center;
    line-height: 200px;
}


.el-aside::-webkit-scrollbar {
    display: none
}




.el-main {
    height: calc(100vh - 80px);
    background-color: #E9EEF3;
    color: #333;
    // text-align: center;
    // line-height: 160px;
}

body>.el-container {
    margin-bottom: 40px;
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
    line-height: 260px;
}

.el-container:nth-child(7) .el-aside {
    line-height: 320px;
}
</style>